package com.yczx.writeDb;

import com.taosdata.jdbc.TSDBDriver;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;

public class test {
    public static void main(String[] args) throws Exception {
        TDengineConnect tDengineConnect = new TDengineConnect();
        Connection restConn = tDengineConnect.getRestConn("demo");
        Statement stmt = restConn.createStatement();
        stmt.executeUpdate("use demo");
        // insert data
        int affectedRows = stmt.executeUpdate("insert into t values(now, 3) (now + 1s, 7)");
        System.out.println("insert " + affectedRows + " rows.");

    }

}
